package com.joker.aigc.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import com.joker.aigc.domain.entity.UserApply;
import com.joker.aigc.domain.vo.UserApplyVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 20346
 * @description 针对表【user_apply(用户信息申请表)】的数据库操作Mapper
 * @createDate 2023-12-24 16:47:58
 */
@Mapper
public interface UserApplyMapper extends MPJBaseMapper<UserApply> {


    @Select("select a.id,a.apply_uid,a.apply_info, u.id as uid, u.avatar ,u.username from user_apply a " +
            "left join user u on u.id=a.apply_uid where a.to_uid=#{uid} ")
    List<UserApplyVo> queryUserApplyByUid(@Param("uid") Long uid);

}




